package com.ksd.pug.controller.user;

import com.ksd.pug.controller.APIBaseController;
import com.ksd.pug.pojo.SysLoginUser;
import com.ksd.pug.service.user.ISysLoginUserService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: hcl
 * @date: 2022/1/24 15:06
 * @Description:
 */
@RestController
@RequiredArgsConstructor
@Slf4j
public class UserControllerXQ extends APIBaseController {

    private final ISysLoginUserService userService;


    /**
     * 根据用户id查询用户信息
     * @param id
     * @return
     */
    @GetMapping("/user/get/{id}")
    public SysLoginUser getUser(@PathVariable("id") Long id) {
        log.info("用户id是:{}",id);
        return userService.getUser(id);
    }

}
